<%- await include('../layout/header.ejs') %>
<%
  // cache
  if(!site._docTree){
    site._docTree={
      relativeTop:{},
    };
  }
  // relativeTop
  let relativeTop=site._docTree.relativeTop[article.atomCategoryId];
  if(relativeTop===undefined){
    relativeTop=await ctx.meta.util.performAction({
      method: 'post',
      url: '/a/base/category/relativeTop',
      body: { categoryId: article.atomCategoryId },
    });
    // save
    site._docTree.relativeTop[article.atomCategoryId]=relativeTop;
  }
  // env
  if(relativeTop){
    env('_docTree.relativeTop',relativeTop);
  }
%>
<div class="doc-container sidebar-collapse-mobile">
<div class="category-sidebar">
  <h3 class="title"></h3>
  <div class="tree"></div>
</div>
<article class="article-doc">
  <%- await include('../layout/article/title.ejs')%>
  <div class="article-body">
    <%- article.html %>
  </div>
  <%- await include('../layout/article/attachments.ejs') %>
  <%- await include('../layout/article/brothers.ejs') %>
  <%- await include('../layout/article/socialshare.ejs') %>
  <%- await include('../layout/article/stat.ejs') %>
  <%- await include('../layout/article/copyright.ejs') %>
  <%- await include('../layout/article/comments.ejs') %>
</article>
</div>
<%- await include('../layout/footer.ejs') %>
